<?php

declare(strict_types=1);

namespace App\Model;


/**
 * @property int $id 
 * @property int $typeid 券类型 1-优惠券 2-代金券
 * @property int $discount 折扣(0-99) 优惠券类型有该值
 * @property int $amount 金额 代金券类型有该值
 * @property int $effective_time 有效时间(秒)
 * @property int $owner_userid 拥有者ID
 * @property string $owner_nickname 拥有者昵称
 * @property int $owner_roleid 拥有者角色ID
 * @property int $status 状态 0-未发放 1-未使用 2-已使用 3-已过期 4-已销毁
 * @property int $distribute_time 发放时间
 * @property int $expire_time 过期时间
 * @property int $add_time 添加时间
 */
class Coupon extends Model
{
    /**
     * The table associated with the model.
     */
    protected ?string $table = 'coupon';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'typeid', 'discount', 'amount', 'effective_time', 'owner_userid', 'owner_nickname', 'owner_roleid', 'status', 'distribute_time', 'expire_time', 'add_time'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'typeid' => 'integer', 'discount' => 'integer', 'amount' => 'integer', 'effective_time' => 'integer', 'owner_userid' => 'integer', 'owner_roleid' => 'integer', 'status' => 'integer', 'distribute_time' => 'integer', 'expire_time' => 'integer', 'add_time' => 'integer'];
}
